from datetime import datetime

from django.db import models
from django.utils.safestring import mark_safe 
from django.contrib.gis.db import models #导入Geodjango模块
from users.models import UserProfile

# class Category(models.Model):
#     '''
#     项目的行业分类，可多选
#     '''
#     name = models.CharField(max_length=50, verbose_name='分类名称')
#     desc = models.CharField(max_length=100, verbose_name='分类描述',blank=True)
#     sort = models.IntegerField(default=0, verbose_name='排序值')
#     parent = models.ForeignKey('self', null=True, blank=True, related_name='children', verbose_name='上级分类',
#                                limit_choices_to={'is_abort': False, 'is_root': True},on_delete=models.CASCADE)
#     is_root = models.BooleanField(default=False, verbose_name='是否是一级分类')
#     is_abort = models.BooleanField(default=False, verbose_name='是否删除')

#     class Meta:
#         verbose_name = '行业分类'
#         verbose_name_plural = verbose_name
    
#     def get_WorkFlow_nums(self):
#         # return self.WorkFlow_set.all().count()
#         wf = WorkFlow.objects.fiter()
#         return self.wf_set.all().count()
#     get_WorkFlow_nums.short_description = "行业数"

#     def __str__(self):
#         return self.name